<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vue.js"></script>
</head>
<body>
<div id="app">{{msg}}</div>
</body>
<script>
    var vue = new Vue({
        el: '#app',  // 挂载点
        data: {
            msg: "hello world!" //数据
        }
    })

    setTimeout(function () {
        var data=vue.$data;  // $data 即为vue 中的data对象
        data.msg="Bye!";
    }, 2000)
</script>
</html>